import React, { Component } from "react";
// 组件

import "./haveBankCard.scss";
import iconCheck from "../../../../../images/icon/icon_hui_check.png";
import iconChecked from "../../../../../images/icon/icon-checked.png";
import arrorw from "../../../../../images/icon-arrorw-right.png";
/**
 * 描述：
 * 作者：zenghq
 * 日期：2020-08-20
 */
class haveBankCard extends Component {
	constructor(props) {
		super(props);
		this.state = {};
	}
	/*******************生命周期 start************************/
	componentDidMount = () => {};
	componentWillUnmount = () => {};
	/*******************生命周期 end************************/

	/*******************业务方法 start************************/
	/*******************业务方法 end************************/

	/*******************点击事件 start************************/
	/*******************点击事件 end************************/

	/**渲染 */
	render() {
		const { data } = this.props;
		console.log(111, data);
		return (
			<div className="have_bank-box">
				<div className="sub-title">还款银行卡</div>
				<div className="card-box" onClick={() => this.props.onChange()}>
					<img className="logo" src={data.logurl} />
					<div className="text-box">
						<div className="bank_name">{`${data.bankName}(${data.bankAccount})`}</div>
					</div>
					<img
						className="check-img"
						src={data.alipay ? iconCheck : iconChecked}
					/>
				</div>
				<div className="change-box" onClick={() => this.props.onClick()}>
					<div>切换其他银行卡支付</div>
					<img src={arrorw} />
				</div>
			</div>
		);
	}
}

export default haveBankCard;
